<?php
class MyUtil{
	
    public static function getRemoteAddr() {
         if (empty($_SERVER['REMOTE_ADDR']) && empty($_SERVER['HTTP_CLIENTIP'])) {
             return null;
         }
         elseif (empty($_SERVER['HTTP_CLIENTIP'])) {
             return $_SERVER['REMOTE_ADDR'];
         }
         else {
             return $_SERVER['HTTP_CLIENTIP'];
         }
     }
    
    public static function today(){
        return mktime(0,0,0,date('m'),date('d'),date('Y'));
    }
}
